package com.example.yucheng.service;

import com.example.yucheng.domain.*;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.List;

public interface OutboundService {
    OutboundOrder getOutboundOrderList( String orderNo);

    List<OutboundUnit> getOutboundOrderDetail(Integer oId);

    void updateOutboundOrder(OutboundOrder outboundOrder);

    void deleteOutboundOrder(String orderNo);

    void addOutboundOrder(OutboundOrder outboundOrder);

    void addOutboundGood(OutboundGood outboundGood);

    List<OutboundOrder> setSort(@Param("receivingUnit")String receivingUnit,@Param("goodName") String goodName,@Param("startTime") Date startTime, @Param("endTime")Date endTime);

    List<OutboundOrder> getAllOutboundOrderList(Integer pageNum, Integer pageSize);

    List<Loss> getLossList();

    String findGoodName(String text);

    Stock findGoodNameById(int gId);

    void addLoss(Loss loss);

    void deleteLossById(int id);

    OutboundOrder findOutboundOrderByOrderNo(String orderNo);

    List<OutboundOrder> getOutboundOrdeNo(@Param("receivingUnit")String receivingUnit,@Param("goodName") String goodName,@Param("startTime") Date startTime, @Param("endTime")Date endTime);

    Loss getLossById(int id);

    void addGoodList(Integer id, String remark);

    void addOutboundUnit(@Param("rId") Integer rId, @Param("receivingPerson")String receivingPerson, @Param("department")String department, @Param("good")Stock good,@Param("oId")Integer oId, @Param("number") double number,@Param("remark") String remark,@Param("per") String per,@Param("costPrice") double costPrice);

    int getOutGoodIdByGid(Integer id);

    List<OutboundGood> getOutboundGoodList(@Param("gId") Integer gId);

    List<OutboundGood> getAllOutboundGoodList();

    List<OutboundUnit> getboundUnit(Integer id);

    List<OutboundGood> getGoodInfo(Integer oId);

    void updateOutboundDetail(OutboundUnit outboundUnit);

    OutboundGood  findOutboundGood(int id);

    void updateOutboundGoodInfo(Integer id, Integer gId);

    void deleteOutboundUnit(int id);

    OutboundGood getOutboundByGid(Integer id);
}
